{extend name="admin@main"}

{block name="content"}

<div class="layui-tab layui-tab-card think-bg-white">
    <ul class="layui-tab-title notselect">
        <li data-type='store-config-type-params'>商城参数设置</li>
        <li data-type="store-config-type-sms1">国内短信设置</li>
        <li data-type="store-config-type-sms2">国际短信设置</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item">{include file='config/index-store-config'}</div>
        <div class="layui-tab-item">{include file='config/index-store-message1'}</div>
        <div class="layui-tab-item">{include file='config/index-store-message2'}</div>
    </div>
</div>

<script>
    (function (storage) {
        (function (type, $default, $checked) {
            $default = $('.layui-tab ul.layui-tab-title li:first');
            $checked = $('.layui-tab ul.layui-tab-title li[data-type="' + type + '"]');
            ($checked.length > 0 ? $checked : $default).trigger('click');
        })(layui.data(storage)['type'] || '');
        $('.layui-tab ul.layui-tab-title li[data-type]').on('click', function () {
            layui.data(storage, {key: 'type', value: this.getAttribute('data-type')});
        });
    })('store-config-type');
</script>
{/block}
